package org.jeecg.modules.demo3.fly.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.demo3.fly.entity.assist.qun.Thirdparty;

import java.util.List;

/**
 * @author wjn
 * @version V1.0
 * @date 2021/6/30 16:48
 * @Copyright © 2021/6/30 深圳卓翼航空无人机有限公司
 */
public interface ThirdpartyMapper extends BaseMapper<Thirdparty> {

    /*
    * 添加关系
    * String id
    * int tag 标识符
    * String u_id 用户id
    * String f_id 群id
    * */
    int getByThirdparty(Thirdparty thirdparty);

    /*
    *  通过 群id 查询 u_id 判断该用户是否已经存在于该群
    *  String f_id
    *  String u_id
    * */
    Thirdparty getByUser(String fId,String uId);

    /*
     * 移除队员
     * String uId 队员id
     * String fId 移除的群id
     * */
    int getByDeleteUser(String fId,String uId);

    /*
    * 查询 tag 为1的用户
    * String fId
    * ing tag
    * */
    Thirdparty getByThir(String fId);

    /*
    * 修改 固定群中的 队长
    * String fId
    * String uId
    * */
    int getUpdateByTeam(String fId,String uId,Integer tag);

    /*
    * 查询所有群成员
    * */
    List<Thirdparty> getUId(String fId);

    /*
    * 根据uId 查询群id
    * */
    List<String> getFluckId(String uId);

    /*
    * 删除群
    * String fId
    * */
    int getDeleteThirdparty(String Fid);

}
